home *** CD-ROM | disk | FTP | other *** search
/ Champak 50 / Volume 50 - JOGO DISK .iso / Games / mallcrawl.swf / scripts / __Packages / mx / core / View.as < prev   
Encoding:
Text File  |  2007-09-28  |  3.7 KB  |  149 lines

  1. class mx.core.View extends mx.core.UIComponent
  2. {
  3.    var boundingBox_mc;
  4.    var border_mc;
  5.    var __tabIndex;
  6.    var depth;
  7.    var loadExternal;
  8.    var createClassChildAtDepth;
  9.    static var symbolName = "View";
  10.    static var symbolOwner = mx.core.View;
  11.    static var version = "2.0.2.126";
  12.    var className = "View";
  13.    static var childNameBase = "_child";
  14.    var hasBeenLayedOut = false;
  15.    var _loadExternalClass = "UIComponent";
  16.    function View()
  17.    {
  18.       super();
  19.    }
  20.    function init()
  21.    {
  22.       super.init();
  23.       this.tabChildren = true;
  24.       this.tabEnabled = false;
  25.       this.boundingBox_mc._visible = false;
  26.       this.boundingBox_mc._width = this.boundingBox_mc._height = 0;
  27.    }
  28.    function size()
  29.    {
  30.       this.border_mc.move(0,0);
  31.       this.border_mc.setSize(this.width,this.height);
  32.       this.doLayout();
  33.    }
  34.    function draw()
  35.    {
  36.       this.size();
  37.    }
  38.    function get numChildren()
  39.    {
  40.       var _loc3_ = mx.core.View.childNameBase;
  41.       var _loc2_ = 0;
  42.       while(true)
  43.       {
  44.          if(this[_loc3_ + _loc2_] == undefined)
  45.          {
  46.             return _loc2_;
  47.          }
  48.          _loc2_ = _loc2_ + 1;
  49.       }
  50.       return -1;
  51.    }
  52.    function get tabIndex()
  53.    {
  54.       return !this.tabEnabled ? undefined : this.__tabIndex;
  55.    }
  56.    function addLayoutObject(object)
  57.    {
  58.    }
  59.    function createChild(className, instanceName, initProps)
  60.    {
  61.       if(this.depth == undefined)
  62.       {
  63.          this.depth = 1;
  64.       }
  65.       var _loc2_ = undefined;
  66.       if(typeof className == "string")
  67.       {
  68.          _loc2_ = this.createObject(className,instanceName,this.depth++,initProps);
  69.       }
  70.       else
  71.       {
  72.          _loc2_ = this.createClassObject(className,instanceName,this.depth++,initProps);
  73.       }
  74.       if(_loc2_ == undefined)
  75.       {
  76.          _loc2_ = this.loadExternal(className,this._loadExternalClass,instanceName,this.depth++,initProps);
  77.       }
  78.       else
  79.       {
  80.          this[mx.core.View.childNameBase + this.numChildren] = _loc2_;
  81.          _loc2_._complete = true;
  82.          this.childLoaded(_loc2_);
  83.       }
  84.       this.addLayoutObject(_loc2_);
  85.       return _loc2_;
  86.    }
  87.    function getChildAt(childIndex)
  88.    {
  89.       return this[mx.core.View.childNameBase + childIndex];
  90.    }
  91.    function destroyChildAt(childIndex)
  92.    {
  93.       if(!(childIndex >= 0 && childIndex < this.numChildren))
  94.       {
  95.          return undefined;
  96.       }
  97.       var _loc4_ = mx.core.View.childNameBase + childIndex;
  98.       var _loc6_ = this.numChildren;
  99.       var _loc3_ = undefined;
  100.       for(_loc3_ in this)
  101.       {
  102.          if(_loc3_ == _loc4_)
  103.          {
  104.             _loc4_ = "";
  105.             this.destroyObject(_loc3_);
  106.             break;
  107.          }
  108.       }
  109.       var _loc2_ = Number(childIndex);
  110.       while(_loc2_ < _loc6_ - 1)
  111.       {
  112.          this[mx.core.View.childNameBase + _loc2_] = this[mx.core.View.childNameBase + (_loc2_ + 1)];
  113.          _loc2_ = _loc2_ + 1;
  114.       }
  115.       delete this[mx.core.View.childNameBase + (_loc6_ - 1)];
  116.       this.depth = this.depth - 1;
  117.    }
  118.    function initLayout()
  119.    {
  120.       if(!this.hasBeenLayedOut)
  121.       {
  122.          this.doLayout();
  123.       }
  124.    }
  125.    function doLayout()
  126.    {
  127.       this.hasBeenLayedOut = true;
  128.    }
  129.    function createChildren()
  130.    {
  131.       if(this.border_mc == undefined)
  132.       {
  133.          this.border_mc = this.createClassChildAtDepth(_global.styles.rectBorderClass,mx.managers.DepthManager.kBottom,{styleName:this});
  134.       }
  135.       this.doLater(this,"initLayout");
  136.    }
  137.    function convertToUIObject(obj)
  138.    {
  139.    }
  140.    function childLoaded(obj)
  141.    {
  142.       this.convertToUIObject(obj);
  143.    }
  144.    static function extension()
  145.    {
  146.       mx.core.ExternalContent.enableExternalContent();
  147.    }
  148. }
  149.